home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 022 - HO Utilities - Clock Utility System.dsk / CLOCKWORKS.bas < prev    next >
BASIC Source File  |  2019-02-16  |  7KB  |  120 lines

  1. 1  FOR I = 0 TO 9: READ Z: POKE 768 +I,Z: NEXT : DATA  104,168,104,166,223,154,72,152,72,96
  2. 2  DEF  FN PK(X) =  PEEK(X) + PEEK(X +1) *256 +2 *4096
  3. 10  IF  PEEK(49048) <128  THEN  TEXT : HOME : VTAB 10: HTAB 8: PRINT "<CTRL-I>CANNOT ENHANCE APPLEWORKS": HTAB 13: PRINT "ON AN APPLE ][": VTAB 20: PRINT "PRESS A KEY TO QUIT";: GET Q$: PRINT  CHR$(4)"BYE"
  4. 500  TEXT : HOME 
  5. 510  PRINT "<CTRL-D>PR#3"
  6. 520  PRINT 
  7. 530  VTAB 6
  8. 540  PRINT "                    ________________________________________"
  9. 550  PRINT "                   |                                        |"
  10. 560  PRINT "                   |               AppleWorks               |"
  11. 570  PRINT "                   |                           TM           |"
  12. 580  PRINT "                   |          CLOCKWORKS Utility            |"
  13. 590  PRINT "                   |________________________________________|"
  14. 600  VTAB 17: PRINT "             Copyright (c) 1985 - 1987  Applied Engineering"
  15. 610  VTAB 19: PRINT "                              ALL RIGHTS RESERVED"
  16. 620  VTAB 22: PRINT "-------------------------------------------------------------------------------"
  17. 630  VTAB 23: PRINT "                                Please Wait...."
  18. 640  PRINT  CHR$(4)"bload /install/clock,a$6800": REM  Machine lang clock routines
  19. 652  REM 
  20. 654  REM 
  21. 670  GOSUB 2000: REM  Step user into everything.
  22. 672  REM 
  23. 674  REM 
  24. 680  GOSUB 10000
  25. 690  VTAB 10: PRINT "Remove the Clock Utilities from the disk drive."
  26. 695  PRINT : PRINT "Place your COPY of the AppleWorks STARTUP disk into drive one."
  27. 700  GOSUB 10000
  28. 740  ONERR  GOTO 890
  29. 741  REM 
  30. 742  REM       BEGIN WORKING
  31. 743  REM 
  32. 746  VTAB 24: CALL  -868: PRINT "                                Working";: VTAB 18: PRINT 
  33. 750  PRINT  CHR$(4)"bload aplworks.system,t$ff,a$4000": IF  PEEK(16386) = 72  THEN  TEXT : HOME : PRINT : PRINT "This utility can not be run on a copy of AppleWorks that has already": PRINT "been modified with the time utility.": END 
  34. 755 N =  PEEK(16385):V0 = (N = 149):V1 = (N = 3):V2 = (N = 23):V3 = (N = 37):V4 = (N = 8):G2 = (N = 46):G3 = (N = 253):F2 = (N = 75): IF V1  THEN VA = ( PEEK(16394) = 64):NB =   NOT VA
  35. 760 PTR = 6 *4096 +8 *256 +3
  36. 765  IF V0  OR V1  THEN  FOR I = 0 TO ( PEEK(16386) = 58): GOSUB 9000: NEXT 
  37. 770  POKE PTR,(V0 *16) +(V1 *17) +(V2 *18) +(V3 *19) +(V4 *32) +(G2 *146) +(G3 *164) +(F2 *146)
  38. 775 PTR = PTR +11: POKE  FN PK(PTR), PEEK(16385): POKE  FN PK(PTR) +1, PEEK(16386)
  39. 780  POKE 16385,0: POKE 16386,72
  40. 785 PTR = PTR +18:N = ((V0 +V1) *7970) +(V2 *7935) +(V3 *7946) +(V4 *7971) +(G2 *7930) +(G3 *7966) +(F2 *7981): POKE  FN PK(PTR),N - INT(N/256) *256: POKE  FN PK(PTR) +1,N/256
  41. 790 PTR = PTR +2:N = (V4 *12493) +(G3 *12482): POKE  FN PK(PTR),N - INT(N/256) *256: POKE  FN PK(PTR) +1,N/256
  42. 800  PRINT  CHR$(4)"unlock aplworks.system"
  43. 805  PRINT  CHR$(4)"bsave aplworks.system,t$ff,a$4000,e$6CF8"
  44. 806  REM 
  45. 810  GOSUB 3000: REM  Check and execute the Data Base mod
  46. 815  REM 
  47. 820  VTAB 24: CALL  -868: PRINT "                          Configuration complete"
  48. 840  FOR I = 1 TO 10:A% =  PEEK( -16336) *1 + PEEK( -16336): NEXT 
  49. 850  FOR LL = 1 TO 1000: NEXT 
  50. 870  TEXT : HOME 
  51. 871  PRINT  CHR$(4)"bye"
  52. 884  REM 
  53. 885  REM    ERROR HANDLING ROUTINES  (CALLED BY ONERR GOTO)
  54. 886  REM 
  55. 890  PRINT : ON  PEEK(222)/2 -1 GOSUB 900,910,920: PRINT : POKE  -16368,0: PRINT "Press Q to quit or any other key to continue. ";: GET A$: IF A$ < >"q"  AND A$ < >"Q"  THEN  RESUME 
  56. 895  GOTO 870
  57. 900  PRINT "Disk is write protected.  Please remove write protect tab off disk and reinsert": RETURN 
  58. 910  PRINT "Cannot find correct file": IF ER = 2  THEN  PRINT : PRINT  CHR$(7);"MODIFICATION ABORTED.": TEXT : NEW : END 
  59. 911  IF ER >2  THEN  PRINT "Please check drive for an exact copy of the AppleWorks disk.": RETURN 
  60. 912  PRINT "Please enter the prefix of the AppleWorks program": CALL  -868: INPUT PF$: IF PF$ = ""  THEN PF$ = "/APPLEWORKS"
  61. 913  POP :ER = ER +1: PRINT  CHR$(4)"prefix"PF$: RESUME 
  62. 920  PRINT "Unable to read/write on disk.  Please check to see if a copy of the original": PRINT "disk is in drive one and the drive door is closed": RETURN 
  63. 1999  REM <CTRL-J> Print heading and form window<CTRL-J>
  64. 2000  HOME : PRINT "CLOCKWORKS(tm) Time Utility";
  65. 2010  POKE 36,67: PRINT "Version 3.0.2";
  66. 2020  PRINT "By Michael Wilks"
  67. 2030  PRINT "Copyright (c) 1985 - 1987  Applied Engineering";
  68. 2040  POKE 36,62: PRINT "       27 May 1987";
  69. 2045  FOR I = 1 TO 80: PRINT "_";: NEXT 
  70. 2050  VTAB 23: FOR I = 1 TO 80: PRINT "_";: NEXT : VTAB 6: PRINT : POKE 34,4: POKE 35,22
  71. 2055  REM <CTRL-J> Print documentation on screen<CTRL-J>
  72. 2060  HOME : HTAB 34: PRINT "Time Utility"
  73. 2070  PRINT : PRINT "Use this utility ONLY on a BACKUP copy of the AppleWorks disks."
  74. 2080  PRINT : PRINT "If other programs are to make modifications to AppleWorks such as a printer"
  75. 2090  PRINT "interface utility, then they must be done BEFORE applying this utility.  If"
  76. 2091  PRINT "using an AE memory board, use the Time Display option on the Desktop Expander."
  77. 2100  PRINT 
  78. 2110  PRINT : PRINT "The 'OA-? for help' message in the bottom line of the AppleWorks screen will"
  79. 2120  PRINT "be replaced by a date and time display.  You can still use Open-Apple-? to"
  80. 2130  PRINT "access the help screen."
  81. 2140  PRINT : PRINT "This utility also allows the AppleWorks user to enter the current date and time"
  82. 2150  PRINT "into a Data Base category by typing the @ character as the only entry in the"
  83. 2160  PRINT "category.  The name of the category must contain the word DATE or TIME."
  84. 2900  RETURN 
  85. 2999  REM 
  86. 3000  REM  Do Data Base time mod
  87. 3010  REM 
  88. 3050  HOME : VTAB 10: PRINT "Remove the AppleWorks Startup disk from the disk drive."
  89. 3100  PRINT : PRINT "Place your COPY of the AppleWorks PROGRAM disk into drive one."
  90. 3110  GOSUB 10000
  91. 3150  VTAB 24: CALL  -868: PRINT "                                Working";: VTAB 18: PRINT 
  92. 3200 FLN$ = "seg.m0": IF VA  OR V0  THEN FLN$ = "seg.mn"
  93. 3205  REM 
  94. 3206  REM  Poke in intercept to read time/date from clock routines
  95. 3207  REM 
  96. 3210  PRINT  CHR$(4)"unlock ";FLN$
  97. 3220  PRINT  CHR$(4)"bload ";FLN$;",t$00,a$3000,l$3000"
  98. 3225 N =  PEEK(12294) +256 * PEEK(12295) +12288
  99. 3226  IF V0 +V1 +V2 +V3 +G2 +F2  THEN O =  PEEK(N) +256 * PEEK(N +1) -2962:N = N +O -17664:I = 187: GOTO 3230
  100. 3227 N = ((20056 -14592) *V4) +((20270 -14848) *G3) +N +1:I = 184
  101. 3230  POKE N,0: POKE N +1,I: POKE N +20,8: POKE N +21,I
  102. 3240  PRINT  CHR$(4)"bsave ";FLN$;",t$00,a$3000,l$3000"
  103. 3999  RETURN 
  104. 8990  REM 
  105. 8992  REM  Change column of 'XXXK Avail.' if old versions
  106. 8994  REM 
  107. 9000  ONERR  GOTO 9060
  108. 9010  PRINT  CHR$(4)"bload seg.0";I;",t$ff,a$7000"
  109. 9020  POKE 32637,66
  110. 9030  PRINT  CHR$(4)"unlock seg.0";I
  111. 9040  PRINT  CHR$(4)"bsave seg.0";I;",t$ff,a$7000,e$7ffd"
  112. 9050  RETURN 
  113. 9060  CALL 768: ONERR  GOTO 890
  114. 9070  RETURN 
  115. 9990  REM 
  116. 9992  REM  General wait routine to flip through next page
  117. 9994  REM 
  118. 10000  VTAB 24: CALL  -868: PRINT "Press any key to continue....";
  119. 10010  POKE  -16368,0: WAIT  -16384,128: GET A$
  120. 10020  HOME : VTAB 24: CALL  -868: HOME : RETURN